import {createStore, applyMiddleware, combineReducers, compose} from 'redux';
import createSagaMiddleware from 'redux-saga';
import {default as test} from '../model/user';

const composeEnhancers =
    typeof window === 'object' &&
    window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;




const sagaMiddleware = createSagaMiddleware(rootSaga);

const enhancer = composeEnhancers(
    applyMiddleware(sagaMiddleware),
);


let store = createStore(
    combineReducers({
        userList,
        userListPage,
        userAdd,
    }),
    enhancer,
);

sagaMiddleware.run(rootSaga);


export default store;




